﻿Public NotInheritable Class DMSConnection
    Private Shared m_instance As DataServiceDataContext
    Private Shared m_object As Object = New [Object]()

    Private Sub New()
    End Sub

    Public Shared ReadOnly Property Instance() As DataServiceDataContext

        Get
            If m_instance Is Nothing Then
                SyncLock m_object
                    If m_instance Is Nothing Then
                        m_instance = New DataServiceDataContext()
                    End If
                End SyncLock
            End If
            Return m_instance
        End Get
    End Property
   
End Class